package com.example.project.mapper;


import com.example.project.entity.User;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 用户管理Mapper接口
 *
 * @author changyao
 * @date 2024-11-11
 */

public interface UserMapper extends BaseMapper<User> {

    @Select("select DISTINCT user.* from user right join `comment`\n" +
            "on user.id=`comment`.user_id\n")
    List<User> getUser();
}


